<template>
  <SeachTable 
    :tableType="1"
    ref="seachTableRef"
    class="mySeachTable"
    :forms="tableForms"
    :btnLefts="btnLefts"
    :btnRights="btnRights"
    :is-show-page="false" 
    :tableLoading="tableLoading"
    :tableConfig="tableConfig"
    :tableData="tableData"
    :totalPage="totalPage"
    @handlerSearch="handlerSearch"
  >
    <template #sourceChannel="{row}">
      <span>{{ row.sourceChannel }}<span class="remark" v-if="row.remark">（{{ row.remark }}）</span></span>
    </template>
  </SeachTable>
  <EditDialog
    :show="showEditDialog"
    @close="closeEditDialog"
    :detail="dialogData"/>
</template>

<script setup>
import { useCurd,useCommonData } from './Hooks/index';
import EditDialog from './Components/EditDialog.vue'

const {
  tableLoading,
  totalPage,
  tableData,
  btnLefts,
  btnRights,
  tableConfig,
  tableForms,
  handlerSearch,
  dialogData,
  showEditDialog,
  closeEditDialog
} = useCurd();
const { seachTableRef } = useCommonData();
</script>

<style lang="less" scoped>
.remark{
  color: #999;
}
.mySeachTable{
  :deep(.search-table){
    .line-block,.jg{
      display: none;
    }
    .defaultTable{
      height: calc(100% - 70px) !important;
    }
  }
}
</style>